<?php
class Config {
    private static $_instance = null;
    private $_config = null;

    public static function getInstance() {
        if (is_null(self::$_instance)) {
            self::$_instance = new self;
        }

        return self::$_instance;
    }

    public function init($config = null) {
        if ($config) {
            $this->_config = $config;
        }

        return $config;
    }

    public function get($key = null) {
        if (isset($this->_config[$key])) {
            return $this->_config[$key];
        }

        return false;
    }
}